/*
 * @Author: wangtao
 * @Date: 2020-08-20 14:07:42
 * @LastEditors: 汪滔
 * @LastEditTime: 2020-08-28 11:17:35
 * @Description:
 */

import React from 'react';
import {
  View,
  StyleSheet,
  Image,
  Text,
  ImageBackground,
  TouchableOpacity,
} from 'react-native';
import { faceCard, iconCamera } from '../../../../../image';
import { Button, msg, DashLine } from '../../../../../common';
import {
  isAndroid,
  mainBgColorLightGray,
  screenWidth,
  mainBgColorWhite,
  px2dp,
  fontColorBlack,
  fontColorLightGray,
  fontColorOrange,
  fontColorSecDeepGray,
  fontColorCoffee,
  fontColorDeepGray,
} from '../../../../../common/styles';

import CameraCard from './camera-card';

const { Submit } = Button;

export default class ThingsLicense extends React.Component {
  render() {
    const { selectImg, proveImgId } = this.props;
    return (
      <View style={styles.workLicenseFloor}>
        <Text style={styles.title}>
          三年无事故证明
          <Text style={{ color: fontColorSecDeepGray, fontSize: px2dp(28) }}>
            (必填)
          </Text>
        </Text>
        <View style={styles.list}>
          <CameraCard
            title='上传三年无事故证明'
            selectImg={() => selectImg('proveImgId')}
            type={proveImgId}
          />
        </View>
      </View>
    );
  }
}

const styles = StyleSheet.create({
  workLicenseFloor: {
    width: screenWidth,
    backgroundColor: mainBgColorWhite,
    marginTop: px2dp(24),
    padding: px2dp(32),
    alignItems: 'center',
  },
  title: {
    fontSize: px2dp(32),
    color: fontColorBlack,
    fontWeight: 'bold',
    textAlign: 'left',
    width: '100%',
  },
  desc: {
    fontSize: px2dp(28),
    color: fontColorSecDeepGray,
    textAlign: 'center',
  },
  bgStyle: {
    width: px2dp(540),
    height: px2dp(320),
    marginVertical: px2dp(32),
    justifyContent: 'center',
    alignItems: 'center',
  },
  cameraImg: {
    width: px2dp(144),
    height: px2dp(144),
  },
  list: {
    width: '100%',
    flexDirection: 'row',
    justifyContent: 'space-between',
  },
});
